<?php 
defined('IN_TS') or die('Access Denied.');
$userid = aac('user')->isLogin();

$strUser = aac('user')->getOneUser($userid);

$arrPayLog = $new['user']->findAll('pay_log',array(
	'userid'=>$userid,
),'addtime desc');

foreach($arrPayLog as $k=> $item){
	$arrGift = aac('gift')->find('gift',array('giftid'=>$item['giftid']));
	if($item['status']==1){
		$statusinfo = '购买';
	}else{
		$statusinfo = '出售';
	}
	$url = tsUrl('gift','show',array('id'=>$item['giftid']));
	$arrPayLog[$k]['statusinfo'] = $statusinfo.'<a href="'.$url.'">'.$arrGift['title'].'</a>';
}


$title = '财务记录';
include template('pay');